package com.ruoyi.wmsorder.quartz.config;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.utils.PageUtils;

import java.text.SimpleDateFormat;
import java.util.Date;
public class OderNos {
    /**
     * @param prefix  编号前缀
     * @param timeFormat 日期格斯
     * @return
     */
    public static    String generateOrderNo(String prefix , String timeFormat ){
        Date date = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat(timeFormat);
        String format = sdf.format(date);
        ++SerialNumber.purchaseSerial;
        System.out.println("流水号："+SerialNumber.purchaseSerial);
        return  prefix+format+SerialNumber.purchaseSerial;
    }
}
